.seamless-scroll-demo {
  padding: 20px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  border-radius: 10px;
  font-family: 'Arial', sans-serif;
}

.seamless-scroll-demo h3 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.scroll-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.scroll-section h4 {
  margin-bottom: 15px;
  color: #64b5f6;
  font-size: 18px;
  border-bottom: 2px solid #64b5f6;
  padding-bottom: 5px;
}

/* 垂直滚动样式 */
.vertical-scroll-container {
  height: 100% !important; /* 将固定高度改为100% */
  min-height: 150px; /* 添加最小高度防止内容过少时容器塌陷 */
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(0,0,0,0.1);
  position: relative;
}

.vertical-scroll-content {
  animation: scrollUp 20s linear infinite;
}

.vertical-scroll-container.paused .vertical-scroll-content {
  animation-play-state: paused;
}

@keyframes scrollUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.scroll-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  min-height: 40px;
  transition: background-color 0.3s ease;
}

.scroll-item:hover {
  background: rgba(255,255,255,0.1);
}

.item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

.item-text {
  font-size: 14px;
  line-height: 1.4;
}

/* 不同状态的颜色 */
.scroll-item.normal .item-dot {
  background: #4caf50;
}

.scroll-item.success .item-dot {
  background: #8bc34a;
}

.scroll-item.warning .item-dot {
  background: #ff9800;
}

.scroll-item.info .item-dot {
  background: #2196f3;
}

.scroll-item.error .item-dot {
  background: #f44336;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* 水平滚动样式 */
.horizontal-scroll-container {
  height: 60px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(0,0,0,0.1);
  position: relative;
}

.horizontal-scroll-content {
  display: flex;
  animation: scrollLeft 30s linear infinite;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.horizontal-item {
  flex-shrink: 0;
  padding: 15px 20px;
  margin-right: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 25px;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.horizontal-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.horizontal-item.normal {
  border-left: 4px solid #4caf50;
}

.horizontal-item.success {
  border-left: 4px solid #8bc34a;
}

.horizontal-item.warning {
  border-left: 4px solid #ff9800;
}

.horizontal-item.info {
  border-left: 4px solid #2196f3;
}

.horizontal-item.error {
  border-left: 4px solid #f44336;
}

/* 控制面板 */
.control-panel {
  text-align: center;
  margin-top: 30px;
}

.control-panel button {
  background: linear-gradient(45deg, #64b5f6, #42a5f5);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

.control-panel button:hover {
  background: linear-gradient(45deg, #42a5f5, #1e88e5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

.control-panel button:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .seamless-scroll-demo {
    padding: 15px;
  }
  
  .vertical-scroll-container {
    height: 150px;
  }
  
  .horizontal-scroll-container {
    height: 50px;
  }
  
  .scroll-item {
    padding: 8px 12px;
  }
  
  .item-text {
    font-size: 12px;
  }
  
  .horizontal-item {
    padding: 10px 15px;
    font-size: 12px;
  }
}

/* 滚动条美化 */
.vertical-scroll-container::-webkit-scrollbar,
.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
}

/* 添加一些视觉效果 */
.vertical-scroll-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
  z-index: 1;
  pointer-events: none;
}

.vertical-scroll-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  z-index: 1;
  pointer-events: none;
}

.horizontal-scroll-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20px;
  background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
  z-index: 1;
  pointer-events: none;
}

.horizontal-scroll-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 20px;
  background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
  z-index: 1;
  pointer-events: none;
}
